﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.LightSwitch;
namespace LightSwitchApplication
{
    public partial class RecipeDependency
    {
        partial void RecipeName_Compute(ref string result)
        {
            // Set result to the desired field value
            if (this.ParentRecipeProduct != null && this.ParentRecipeProduct.ProductGroup != null
                    && this.ChildProductGroup != null && this.ChildProduct != null)
            {
                result = this.ChildProduct.ProductName;
                    //+" (" + this.ParentRecipeProduct.ProductGroup.ProductGroupName + " -> "
                    //+ this.ParentRecipeProduct.ProductName + " -> "
                    //+ this.ChildProductGroup.ProductGroupName ;
            }
        }
    }
}
